package com.frxuexi.mymvi

import com.frxuexi.lib_http.HttpType
import com.frxuexi.lib_http.NetWorkFactory
import com.frxuexi.mymvi.entity.NewsData
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

@OptIn
class NewsREpository @Inject constructor() {
    val apiService by lazy { NetWorkFactory.factory(HttpType.NONE).create(ApiService::class.java) }

    fun getNews(page:Int):Flow<NewsData>{
        return apiService.getNews(page)
    }
}